import 'package:shop/common/shop_material.dart';

class Page4 extends StatefulWidget {
  Page4({Key key}) : super(key: key);
  @override
  _Page4State createState() => _Page4State();
}

class _Page4State extends State<Page4> {
  //这里写属性
  @override
  void initState() {
//初始化
    super.initState();
    _initGetData();
  }

  _initGetData() async {
//网络请求
  }
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("直播页面"),
      ),
      body: Center(
          child: Column(
        children: <Widget>[
          FlatButton(
            onPressed: () {
              route.pushNamed(MyRoutes.rtmp);
            },
            child: Text("推流"),
          ),
          FlatButton(
            onPressed: () {
              route.pushNamed(MyRoutes.play);
            },
            child: Text("拉流"),
          ),
        ],
      )),
      floatingActionButton: FloatingActionButton(onPressed: () async {}),
    );
  }

  @override
  void dispose() {
//销毁
    super.dispose();
  }
}
